fixes and cleanup for new phalanx code