Cleaned up code

deleted old chunks of commented code, redundant code, unused imports,
etc.