Refactoring frontend

idem