Refactored to implement module functionality + updated docs