Code cleanup to make coffeelint happier
[Front] Refactoring of message sort and filter