some cleanup but modal bug outstanding