Enhanced security. Clean up code