first part of the frontend cleanup