Refactored to simplify method calls, and provide more useful method names.