Fixed bug with using os as std::cout and added some default headers.