Cleaned up code with very small modifications to reflect new memory map with hardware revision number