Refac and simplification