re{factoring, naming}

moved platform specific implementation into its own folder
replaced - with _ in function names
fixed empty argument checking