Added header files, other fixes