added pertag layout, nmaster, and mfact support. Over 2 KLOC now :(