Restructured files. Working on pmsm.
PMSM passing type checker.