fix modal window, add keypress modal killer, add function template test