Further clean up, remove redundant modules and bugs fixed.