Cleaned up regex. Removed excessive logging.