Implemented some small secure improvements.