Repositiry refactoring to simplify workflow.

As per Issue 9 synch request.