Judge orders firearms center to remove unpermitted buildings