fix layer insertion at end of layer list by using position -1 when no index provided or when index is past end of number of layers.
add toString method on layers.
add tests for layer insertion and layer toString.