Removing old commented code.
Implementing the codes from MIM.

The codes are implemented as they are documented in MIM. This will probably
change in the future when Mattias returns with the final document with all the
codes.