Substation multifix MK I

First half of my multifix, should fix all known code errors. Also includes suggestions.