First round of refactory