Rearchited the application to define better primitives