All done. Finally it compiles. FIXME: it doesn't work properly! : (