This is a pretty great game. The story is awesome and really puts a spin on investigating. I also love how your thoroughness can effect things so greatly.
On that note, I've noticed that a lot of people are looking for answers in the comments for one ending or another so I'll drop some hints.
The medal labeled "The End" is linked to what happens if you don't use your full investigative capabilities as a ghost. If you stick to just doing the necessities (checking the alibis, crossing off two suspects, and only needing to possess three people besides Cricket to do it) then you will get this ending. it reveals the killer and the motive, but doesn't fill in the gaps on some of the tenants' stories and is therefore essentially the "bad" ending in literal and metaphorical terms.
The two secret medals are awarded to you if you fully investigate everyone using all the people you can possess, leaving no holes in the alibis. "The Real Detective in the Building" is linked to using your ghostly investigative skills to use people other than Cricket and the three necessary people you have to possess to investigate the crime. By digging deeper into the minds of the suspects themselves by having them interact with everyone, you can cause one of them to learn some things about the investigation and change the ending, which is the subject of the second medal. The second secret medal is essentially set in stone by that point. If you do everything the same even after tipping off the suspect, the ending will still be different.
The key to all of the medals involving endings is how you investigate and who you use to investigate. Once you've given two suspects alibis as Cricket and the three necessary people you have to possess, the amount of investigating you do becomes limited. The secret with the "bad" ending is that you didn't investigate with the right person. By having two separate people conduct two separate investigations, you cause the investigation that is completed in the "bad" ending to be turned on its head. If you're still seriously struggling, check the walkthrough the creator posted to fill in some of the stuff you do to cause the "bad" ending, and see if there's anything or anyone who can change it before you do those things.