Added objective update code

The code hasn't been tested for actual functionality, but it does't break the current build.