replace ? only in the correct context

resolves #13, checks that all the parameters are provided
reduce the number of the states
parseParams tests
positional parameters
nested comments
simplify parameter count calculation
bug fix
refactor switch states to functions
Merge pull request #14 from dimdin/master

replace ? only in the correct context, resolves issue #13