Library munger

new branch with code cleanup