updated libraries, code cleanups