fleshed out library, renamed main