validation/exception handling/style changes

added more style and implemented data validation and exception handling
for feature and feature group functions