Code Refactor/Cleanup Pt2

More cleaning of old code, formatting, and the sort