WIP adding tests and flash messages