Re-factor render into separate methods