Minor changes and deleting some debug lines.