Refactored facility map to be simpler and no longer use globals