Added unit test for valuesets + bugfixes. Refactored Specification factory