Refactored bottom half.