adding testcoverage and some structural refactorings
added documentation