change the template to work with bs3 and fix the tests