Added init and print functions, as well as some infrastructure