[DO NOT MERGE] Initial commit of refactor. Still contains old code.

The env variables for CONF_VALID_GEAR_SIZES, CONF_DEFAULT_GEAR_CAPABILITIES, and CONF_DEFAULT_GEAR_SIZE are referenced right, should just s/@puppet_global_config/@env/