Move registry into separate module