Reimplemented the Register to avoid dependencies