Move toggle_maximize func to misc