lib: [WIP] Heavy modification to separate out linux specific code.
lib: [WIP] Builds but functionality needs checking.

Major overhaul of driver structure has been changed to support
better library versus platform separation.