Minor and pedantic changes

Reformat code and refactor the Register into an abstract generic one
using composition and delegation over inheritance.