added configure script
fixed cleanup issue