Corected some build issues and added a library dependency that was missing from the initial commit