Removed most warnings from code, removed old commented code