Progress on function module, and bugfix in mult module.