Clean code and finish first part

clean code