added a return type to main...why. also fixed compile issues