Updated JS source file to include AMD wrapper