added new clean up call
changed to bsd style license