WIP refactor app and add plots