Simplify flask init process