Fixed some crashing bugs where deallocated variables were being called, and improved the delegate methods.