Fix API class loading.

Wow, that has horribly broken before. Also, who the hell represents a Map/MultiMap as a list where the key is one element, and the value is the element directly after it?