Resolved one performance bug, added the documentation in the javascript file and added the license headers