Flask Utilities