added some validation.
cleaned up helper to support Bootstrap classes.