Refactoring script for ProtoPLC use.
More refactoring.
More refactoring.
A bit more fit and finish.
A bit more fit and finish work.