Fixed some warnings, changed how partial read works to improve the worst case
Fixing merge conflicts