Changed code to get leaflist on fly. Space saver.