Transferred the frontend's ugly code from SVN