Fixed comments and removed old code