Add command line options, update libraries versions, minor tweaks