Half way through fixing some stuff