Almost finished adding lua api