Removes main, added constructor and print method