fix a bug that was introduced while fixing jshint warnings
Separate actors out from behaviours module and add tests.
Organize scripts into directories