refactor is going well, though I might have messed up facility declarations. Need to check that out..