Added dynamic method resolve
Fix primitive casts
Fix global functions
Fix integral calls