Refactor mod list

Includes #495 but has been rebased onto master. 
Looking it up Mono only has very basic support for code contracts - while you can get this particular example running it is probably is not worth the hassle.