add memory management
mem_manage can be done in 4kB block
add layer control
speed up mouse movement