Restructure to run as independent app.