Cleaning up unused code