Various changes making compiling without errors possible.