Clean up formatting, add comments, remove unused import
Remove obsolete overflow checks, allow exception to propagate, fix test cases