Removed or commented out unnecessary code