Brushed up frontend code