Improvements and cleanup

@jimaek there's still plenty to do, I just open this so that we can track the progress.