Cleaned up a bunch of code

Having a problem where sometimes an update is requested when it should not be though