Adding sorting of friendliest on Refresh

Also did some cleaning up of the unused files. And some code refractor.