Fixed reading; cleaned up warnings