minor changes compliling David library. Go back here if they do not work