Made main.cpp portable.