cleanup and added rpath