More cleanup & some code simplification