Tmp mac support

merge latest work from my branch + make pasting work in macplatform!