Weighted retention
some cleanup
fixing up tests I broke with the latest changes. grunt karma should now go green.