Moved functions around so that they follow the method order laid out in
the header.