added more cross platform functions
small fixes
fixed comment
Merge branch 'master' into patch