Cleaned up the pretty_print function.