reduce grammar
fix warnings
separated platform specific stuff to their own hearder