cmake build script

Cleaned up and rearranged the source files, created a function (for Ubuntu linux at least) cmake build script.