some cleanup to help compiling with oraclestudio compiler (do not fully work yet)