Frontend refactor. 1st teration of frontend is done.