Removing unused code, formatting cleanup