Better Error Handling and Type Inference for 4D Developers