Marek's refactoring - systematization of test cases, etc
more refactoring
Wrote down Marek's suggestions to remember
added suggestions
Make changes from mareks code review.