More work. Code compilable now.