Adding layers (for instance, for the ship editor)
Some refacoring in Main