Performed a refactor and documentation