Styling and refactoring. WIP: Timing bug persistant