Splitting env checks into functions
Split keep actions into functions, continue to default when necessary