Adds methods to read/write registers.