Refactoring, code reduction, comments

code reduction, beginning: ~250, now: 69