Further updating for new Lem
Fix some types in response to some Lem bug fixes