Cleanup unused code, etc