Renamed p variable to e where appropriate, changed type to size_t where
was int.