Removed unused code and completed commenting and method headers