Trailing spaces removed
Code optimization
Fixed readonly logic
Reimplemented disable after rate option
Fixed calculation of average
Merge pull request #37 from skyeagle/master

Code optimization