Implements variables with category scope.

This change will allow to easily define variables such as BATCH_OPTIONS
per category.