Small fixes all around. The code should compile now.