Fixed dynamic code generation, added import for java.util.Date.