Add Facility and fix some bugs.