clean up, upgrade to the latest libraries and build