Fixed math errors, added header file, pdf included