Cleanup

Removed unnecessary lines of code and cleaned weird code..
Manage outgoing streams
Secure files