Added load memory
Added more debug code