Improvements to the scope of variables

Also added tests for bill actions and bill law