added tests for questionaire and some Refactoring on that class