code and comment cleanups
commands for lines and areas are now in the same order
big deduplication refactor.