Security clean up & logging redesign.