Sepearting out code and adding select html