Only single level optimization
Fix unit conversion bug and added tests