add float support and minor fixes for lua port