Added destructors, fixed some things