Re-add resource selection algorithms

from #48
Cleanup based on @marcoscaceres's suggestions
Tidy
Merge pull request #56 from nwtn/res-sel

Re-add resource selection algorithms