fixing some indents and removing debug codes