Cleanup & better coding conventions