Fixed Security isssues, added debugger, and some bugfixes