Added some methods and code to the classes.