Refactored scripting adaptor support. Added copyright statement to all files. Added some javadoc