Removing Unnecessary Code From Main Python File