improved frontend structure