cleanup and tweaks, needs one more thing before full use