cleanup and add limited compilation support
improve compile and make it safe
let field return its typed value