Moved files around for automeka and add #ifdef for platform specific code.