Cosmits and minor bug fixes.
Add more functions to example file.
Merge pull request #49 from pravsripad/cosmits_jumeg_preproc

Cosmits, minor bug fixes and improved example.