Adds more JSDoc documentation

This doesn't add JSDoc documentation to **every** function yet, so feel free to hold off on merging it if you'd rather wait until then.