Bugfixes to params system + still allow validation for flags. More extensive unit testing