Modify print statments into functions for easier possible transition to python3 at some point