Updated and refactored security procedures and profile management.