Improve collections helper. Just being Generic!

Changed the IFunction to be generic and updated the "each" method in CollectionsHelper, to reflect the new changes. Now there is no need for casting.