protecting $name and renaming register() to registerView()