Refactor/remove registry