added additional functions and moved register map to header file.