Finished the required corrections. Remaining the comments from Chris about the change of integral and sum... ARGHHH.