Fixing up codebase