removed unneeded "else" statements

As every if have return statement else are not needed
removed the trailing spaces in mode function
removed trailing spaces in the empty lines in mode function.
Merge pull request #63 from yaroslavya/master

removed unneeded "else" statements