Clean up code, remove enum which became point for confusion, clean up many comments.
NOTE: Done on c9.io ....has not be compiled/tested.