Working WIP

Hey Leo,

I finally got codegen to work again despite all libsyntax efforts. This is still very far from perfect, but at least compiles and kinda work with the current nightly, so I guess it's a good improvement, so feel free to do whatever you want with this request: merge it now or wait a bit and let me do something cleaner.

-- 
Kali