Simultaneously cleans up some of the naming conventions and tries to make things a bit more template-compatible.