added support for default, classful submasks if none is entered and fixed some stupid logic of repeating local variables inside multiple blocks