Documtation and refactor
Update implementation to reflect API changes