Added PE clustering step
Many minor bugs fixed in many steps