Finish refractoring and comments