Finished branches except saving register mapping, passes till test_b4