Couldn't resists the JAva programmer in me and added documentation.