Moved the print function to the end to keep more related methods closer.