Refactor registry

PR https://github.com/oat-sa/generis/pull/17 should be integrated first