Cleaned up some of the codebase