major refactor. Preparation to get back to #5 is finished.