Finished JSDocs for all files in prototype, fixed a few bugs