Added documentation and some parameter checking
Updated version information