Added more infrastructure

There was include hairiness, which I solved by using forward
declarations where possible.