Added makefile, made mainmenu take input and output streams as arguments