Added basic size_t checks on variables.
Added missing file from last commit.