See here for the finished product.

See code/exercises for the exercises.