Add comments, formatting and class resolution fix
Formatting, indenting & syntax fixes