major overhaul of the frontend controller