Random tweaks and fixes