more cleaning and refactor