diff --git a/_modules/modelschema.py b/_modules/modelschema.py
index 5e319ae..451f3c1 100644
--- a/_modules/modelschema.py
+++ b/_modules/modelschema.py
@@ -65,40 +65,54 @@
 
     .. code-block:: bash
 
-        salt-call modelutils.schema_list
-
-
+        salt-call modelschema.schema_list
     """
+
     output = {}
-    schemas = glob.glob('{}/*/schemas/*.yaml'.format(_get_base_dir()))
-    for schema in schemas:
-        if os.path.exists(schema):
-            role_name = schema.split('/')[-1].replace('.yaml', '')
-            service_name = schema.split('/')[-3]
-            print role_name, service_name
-            name = '{}-{}'.format(service_name, role_name)
-            output[name] = {
-                'service': service_name,
-                'role': role_name,
-                'path': schema,
-                'valid': schema_validate(service_name, role_name)[name]
-            }
+
+    def _parse_schema(pattern, helper, output):
+        schemas = glob.glob(pattern.format(_get_base_dir()))
+        for schema in schemas:
+            if os.path.exists(schema):
+                sc_splited = schema.split('/')
+                parsed = helper(sc_splited)
+                name = '{}-{}'.format(*parsed[:2])
+                output[name] = {
+                    'service': parsed[0],
+                    'role': parsed[1],
+                    'path': schema,
+                    'valid': schema_validate(*parsed)[name]
+                }
+
+    versioned_schemas_path = '{}/*/schemas/*/*.yaml'
+    _parse_schema(versioned_schemas_path, lambda sc: (sc[-4], sc[-1].replace('.yaml', ''), sc[-2]), output)
+
+    common_schemas_path = '{}/*/schemas/*.yaml'
+    _parse_schema(common_schemas_path, lambda sc: (sc[-3], sc[-1].replace('.yaml', '')), output)
+
     return output
 
 
-def schema_get(service, role):
+def schema_get(service, role, version=None):
     """
-    Returns pillar schema for given service and role. If no service and role
-    is specified, method will return all known schemas.
+    Returns pillar schema for given service and role.
 
     CLI Examples:
 
     .. code-block:: bash
 
-        salt-call modelutils.schema_get ntp server
+        salt-call modelschema.schema_get ntp server
 
+    .. or ..
+
+        salt-call modelschema.schema_get keystone server pike
     """
-    schema_path = 'salt://{}/schemas/{}.yaml'.format(service, role)
+
+    if version:
+        schema_path = 'salt://{}/schemas/{}/{}.yaml'.format(service, version, role)
+    else:
+        schema_path = 'salt://{}/schemas/{}.yaml'.format(service, role)
+
     schema = __salt__['cp.get_file_str'](schema_path)
     if schema:
         try:
@@ -111,7 +125,7 @@
     return {'{}-{}'.format(service, role): data}
 
 
-def schema_validate(service, role):
+def schema_validate(service, role, version=None):
     """
     Validates pillar schema itself of given service and role.
 
@@ -119,11 +133,14 @@
 
     .. code-block:: bash
 
-        salt-call modelutils.schema_validate ntp server
+        salt-call modelschema.schema_validate ntp server
 
+    .. or ..
+
+        salt-call modelschema.schema_validate keystone server pike
     """
 
-    schema = schema_get(service, role)['{}-{}'.format(service, role)]
+    schema = schema_get(service, role, version)['{}-{}'.format(service, role)]
     cls = _validator_for(schema)
     LOG.debug("Validating schema..")
     try:
@@ -136,18 +153,21 @@
     return {'{}-{}'.format(service, role): data}
 
 
-def model_validate(service=None, role=None):
+def model_validate(service, role, version=None):
     """
-    Validates pillar metadata by schema for given service and role. If
-    no service and role is specified, method will validate all defined
-    services.
+    Validates pillar metadata by schema for given service and role.
 
     CLI Example:
-    .. code-block:: bash
-        salt-run modelschema.model_validate keystone server
 
+    .. code-block:: bash
+
+        salt-call modelschema.model_validate ntp server
+
+    .. or ..
+
+        salt-call modelschema.model_validate keystone server pike
     """
-    schema = schema_get(service, role)['{}-{}'.format(service, role)]
+    schema = schema_get(service, role, version)['{}-{}'.format(service, role)]
     model = __salt__['pillar.get']('{}:{}'.format(service, role))
     try:
         _validate(model, schema)
@@ -195,7 +215,7 @@
     return data
 
 
-def schema_from_tests(service):
+def schema_from_tests(service, version=None):
     """
     Generate pillar schema skeleton for given service. Method iterates throught
     test pillars and generates schema scaffold structure in JSON format that
@@ -206,10 +226,18 @@
 
     .. code-block:: bash
 
-        salt-call modelutils.schema_from_tests keystone
+        salt-call modelschema.schema_from_tests keystone pike
+
+    .. or ..
+
+        salt-call modelschema.schema_from_tests ntp
     """
-    pillars = glob.glob(
-        '{}/{}/tests/pillar/*.sls'.format(_get_base_dir(), service))
+    if version:
+        pillars = glob.glob(
+                  '{}/{}/tests/pillar/{}/*.sls'.format(_get_base_dir(), service, version))
+    else:
+        pillars = glob.glob(
+                  '{}/{}/tests/pillar/*.sls'.format(_get_base_dir(), service))
     raw_data = {}
     for pillar in pillars:
         if os.path.exists(pillar):
