Small speed improvements