reorganized file, put platform specific code into separate folder.

got scheme "split-frame" implementation working.