Refactored, commented, followed coding standards