Some tweaks to improve speed...no idea if it did