Many changes working towards compilation.