Refactored code to be more legible. Cleaned up a little
Fixed inserting at the position of the cursor, and a few other little things
Added another link to a documentation page, with a little more information