Separated code in fuctions and added Repeat Password feature