Removed settings, added some comments to code