Refactored front end code tree structure.