Handled empty packages. Added prefix to templates.