Remove unnecessary typecasts, implement Collection for PixelBuf and add a convenience method for opening files