Refactoring tests and documentation

Signed-off-by: Jiri Kuncar <jiri.kuncar@gmail.com>