refactored layout, introducing base.html, added error.html