refactored template and some css