Minor updates

Minor tweaks to a number of items including moving some packages to local, declaring
some variables as final etc.