Add names to a few functions and refactor pixel data setting slightly.