Refactors buttons in frontend