Rework layout of some stuff, implement histate call