Some fixes and include corresponding header files