Corrected .gitignore
Added moving average and moving maximum functions
Added example in README, tidied up code for options.