Better indented code and removed some unnecessary whitespaces