Jobid v2

This revises previous version by caching jobid in lu_env. Also addressed review comments on previous patches.