Implement lapi.lua

It is an extention to the base, but written in pure lua...