Final Version

Fixed most bugs.
polyDiff does not return expected results, but I'm too lazy to fix it.