Cleanup and add basic security