options buttons to templating
remove extra code