Renaming stuff, more spliting and reorganizing.
Fix compilation.