Improved template UI

Ensured gear will be a closed loop (first and last coordinates are the
same)
Patched problem with overlapping static boxes and spin controls, will
put in permanent fix later