Removed stupid bool update. and minor code cleanup