New structure and fix some problems with front-end tests.