update for rails 4
add dependent destroy and a bunch of models. hook up some measure data.