Security Updates

Added basic checks for security