Update read and print functions to be inline to prevent multiple definition problems