The code was refactored and documented.