Several improvements to how data is handled