Fix the bugs! :D

and formatting