added memory mapped IO (random), fixes, hooks