shows alert panel on error
improved style
refactored; separated template
moved to src/ directory