Template components and small fixes