Initial commit for major rewrite 2.