Refactored whole repository to match current coding style.