Changed mod visibilities + add doc for types.rs