Updated the app and added unit tests