Reorganize and restyle template