Refs #69. Refactor, further separation of concerns