Moved some functions into muon helpers
Added a helpers for some reocurring bit-pattern related problems
Additional patterns, corrected imports.
Updated COE files, taking into account which input is MSW/LSW.