Cleaned up and fixed the build

Also had to change some types to pointers .
Some fixes to the interface
UI refiniments and fixes