added include guards and  small fixes