Ref #497. Added in a default_org_id variable for javascript to use that is declared in the init file, then removed some declarations that would result in the org_id variable being set to the same value, and changed the logic of the objectives.js api calls to use the default_org_id if not org_id is defined in javascript. Also changed the api call itself to make it use the user's current organisation if that variable isn't provided.
Removed a PHP short tag that causes a fatal error in some environment (where short tags aren't enabled on newer versions of php), and changed the formatting of the code a bit around that spot.