Added documentation and sample IO