Removed unused forward ranking code
Added methods to function templates