use decltype instead of size_t
change client list to use unique_ptr
add datalib lua library
add test of createLayer