Working main for Windows users. Correct interaction with platforms