Code written while following up with codeschool angularjs course.