moved system-specific stuff to separate files