Tested the changes to the install script and fixed bug which was causing the cas context not to be saved. Appears to be working but will need a bit of cleanup.