refactor to move code into PCL core lib

git-tfs-id: [https://tfs.codeplex.com/tfs/tfs01]$/whipstaff/main;C106938
moved some files from old base dll into desktop

git-tfs-id: [https://tfs.codeplex.com/tfs/tfs01]$/whipstaff/main;C106944
tidy up of code

git-tfs-id: [https://tfs.codeplex.com/tfs/tfs01]$/whipstaff/main;C107008
Merge commit '40178868de4098b12158ffa96d14e8e59af9bb08'