Big small code clean-up.

I've made small changes in the compiler's structure - from now, compiler
functions operate on objects, not just ID's of them, so a lot of code
has become cleaner ;)