clean up and start migrating gui from django to flask