Code Clean up

Deleted bunch of unused code, and cleaned/organized code structure.