try to make things thread safe
make CompilationEngine return CompilationDetails
removed unnecessary casts
synchronized compilation