Refactor mod list

Includes #495 but has been rebased onto master.