rapidity user hooks and some cleanup