Added overflow detection, but it needs to be improved.
Merge pull request #10 from chiayolin/core-develop

Core overflow detection