Adds slots to units and environments

Also misc fixes