Finished product. A little bit of commenting is needed.