added unit testing and app architecture