Add preview functionality to templates

Minor adjustments to the gui. No variable names were changed, just size
and location values.
Recommitting stuff