Added some parameter checks to var_main. Stylized buttons in web app.