First Principles Calculations for Liquids and Solids Using Maximally Localized Wannier Functions