Begining cleaning and refacto