Cleaned up remaing traces of old library model. Added dirty flag for library to prevent polling from over writing local changes.