Zeroed the buffer contents at startup to avoid garbage data, and added stricter bounds checking to ensure no out of bounds accesses
Access vector with at-method to get bounds checking.