restructuring to have a separate app and tests