Refactored for the usual reasons