Eliminated some warnings

Changed visibilities, documented public members, removed unneeded casts,
etc.