use SL::DB::RequirementSpec;
 use SL::DB::RequirementSpecComplexity;
 use SL::DB::RequirementSpecItem;
 use SL::DB::RequirementSpec;
 use SL::DB::RequirementSpecComplexity;
 use SL::DB::RequirementSpecItem;
 use Rose::Object::MakeMethods::Generic
 (
   scalar                  => [ qw(item visible_item visible_section clicked_item sections) ],
 use Rose::Object::MakeMethods::Generic
 (
   scalar                  => [ qw(item visible_item visible_section clicked_item sections) ],
   my $old_type            = $self->item->item_type;
   my $new_type            = !$dropped_item ? 'section' : $position =~ m/before|after/ ? $dropped_item->item_type : $dropped_item->child_type;
 
   my $old_type            = $self->item->item_type;
   my $new_type            = !$dropped_item ? 'section' : $position =~ m/before|after/ ? $dropped_item->item_type : $dropped_item->child_type;
 
     $self->item->remove_from_list;
     $self->item->parent_id($position =~ m/before|after/ ? $dropped_item->parent_id : $dropped_item->id) if $dropped_item;
     $self->item->item_type($new_type);
     $self->item->add_to_list(position => $position, reference => $::form->{dropped_id} || undef);
   });
 
     $self->item->remove_from_list;
     $self->item->parent_id($position =~ m/before|after/ ? $dropped_item->parent_id : $dropped_item->id) if $dropped_item;
     $self->item->item_type($new_type);
     $self->item->add_to_list(position => $position, reference => $::form->{dropped_id} || undef);
   });
 
   $self->item(SL::DB::RequirementSpecItem->new(id => $self->item->id)->load);
   my $new_section         = $self->item->section;
   my $new_visible_section = SL::DB::RequirementSpecItem->new(id => $self->visible_item->id)->load->section;
 
   $self->item(SL::DB::RequirementSpecItem->new(id => $self->item->id)->load);
   my $new_section         = $self->item->section;
   my $new_visible_section = SL::DB::RequirementSpecItem->new(id => $self->visible_item->id)->load->section;
 
   my $old_parent  = SL::DB::RequirementSpecItem->new(id => $old_parent_id)->load;
   my $old_section = $old_parent->section;
 
   my $old_parent  = SL::DB::RequirementSpecItem->new(id => $old_parent_id)->load;
   my $old_section = $old_parent->section;
 
   $self->js->show('#sub-function-block-container-' . $parent_id) if $new_type eq 'sub-function-block';
   $self->add_new_item_form(insert_position => $insert_position, insert_reference => $insert_reference, display_reference => $display_reference);
 
   $self->js->show('#sub-function-block-container-' . $parent_id) if $new_type eq 'sub-function-block';
   $self->add_new_item_form(insert_position => $insert_position, insert_reference => $insert_reference, display_reference => $display_reference);