Refactored Jesse's package.