Analysis waiting page hotfix

Explicit int conversion of ids
Updates for Job & Study object changes
is `aid` the same as an `analysis_id`? If so, it would be useful to be consistent with the naming of the variables