Formatted some files and shortened some code