Added some optimizations and deleting objects (ngl this took awhile to add). Update: added more optimizations