added support for javascript backward compatibility and added Apache License Version 2.0