Code for various programming excercises