Updating some stuff for v3, bug fixes.