Updated to use JSDoc format, and some other additions to make autocompletion and Code Inspection work nicer.