Added tri-button to switch between 1d, 1m and 12m resolution
Also moved header to an include file