Formatting fixes.

- add braces to if/for
- indent with tabs instead of spaces
- remove trailing whitespaces
Changed project structure to use default gradle file layout.