Change main to int return type. May stop crashes on windows 8.