Templates and small changes