added using directives and fixed compile errors.