Cleaned up print function