Feature functions

No apparent errors in test code. Should I merge this and my other branch I just requested or does someone want to look at these separately?

Thx!

Function definitions