Added template pattern and bootstrap