Further working on the refactor of this app