Reformatting and Code Cleanup