Cleaning up unused parts of code