Started big refactoring to make front-end easier to contribute.