Improving codebase slightly, still a work-in-progress.