added tests and app factory