Feature functions2

Still needs to be merged, but here it is!!