Cleaned up parts of the codebase