moved out everything else unixy, it at least compiles on avr now