Added usage example and renamed functions.