added more comments, try to start literatizing the codebase