Fixed some vulnerabilities ,change some views.Thanks to Stanislav Mantach for feedback