Rewrote the ActionHandler to use less queries to the db.