Fixed minor bugs and added a print function