Added documentation and clarity