set up library dependencies, cleaned up