If ID is provided it should be attached to the template element in order the remove method to work. Close #458