security, issues, code cleanup