refactored scopes, added workflow related models