Library Service And Other Code Cleanup