Fix app and add basic integration test