Refactored and documented.