Cleaned up...

Added comments, removed unused code