More cleanup and changes. Foundation and enhancment.