Clean up unused code and console logs