basic checking of field presence, hoisting let bindings, better commandline invocation