Refactor thought update. Removed bug in updating thoughts