Refactor several tables. Fix for livechart