Ugly commit; start heavy refactor - several repo concerned