Fix bug in Library.registerEntry
Cleanup Library.registerEntry