Frontend code cleanup