avatar code generation and js inclusions for proper test rendering