initial commit

phpunit passed. Added documentation.