CMS-3409 Simplify serverside javascript implementation. Changed module to be an interface.