Added more security, functionality, and fixed bugs