Moved item template to javascript file