Habit: Theory and Application