added picture support, and bug fixes
minor bug fixes with template html
many small bug fixed and some template changes