Added a lot of boilerplate code to the methods.