Cleaned up the code a little bit and added documentation. Fixed a bug in how REG_EXMEMCNT's double-bit values were printed.