fixing up patch
fixing up patch II
fixing makefiles etc