Some big updates and a logic rework