Reduced redundancies in code, formatted code for easier readability.