speed improvements, move library and kernel space to local ets