Myc restructure

Split huge functions into OS specific files.

Wait for migf1's input before you merge it because he probably won't like it :)