It's time to cleaning my code

I finally did it for Compo and quite satisfied with the result. It much more better than my last two LD entry. But now it's time to do some cleaning on my code because I notice some bugs still been there even the game works just like I wanted.

Here is link to my game, https://ldjam.com/events/ludum-dare/39/power-the-house.