move sorting and rating business logic back to the model
style cleanup
some style fixes
improve tie breaking algorithm
Merge pull request #7 from brandoncc/mod5

move sorting and rating business logic back to the model