Major cleanup, add comments
11 files changed