Added links to github sources for where I have borrowed code. Particularly for gaussian fitting from https://github.com/dfm/optimize.js