General refractorings. Mainly ecs system. Reformatting.