Fixed some security issues and improved set up program