medic_6 completed and some minor security edits