with units and integration tests and an updated style