[TASK] Cast to int instead of using intval

An (int) cast provides better performance than an intval() call.

Closes #128
Merge pull request #129 from jjriv/cleanup/intval

[TASK] Cast to int instead of using intval