codebase cleanup: added docsblocks to methods and fixed indentation.