Cleaned up and changed promises used in the feature API

Tried to take advantage of promise chaining to clean up the featureApi code.