Clean up code for setting rlimits