Some cleanups & small fixes

Please consider to integrate the clean ups & bug fixes we performed