better documentation and code structure, based on self-code review