random code cleanups
fix merge conflicts