Updated templates for lock and reset buttons. Added event listeners.
Reset image dimensions. Image resizing improvements.