Flux Compactifications on Calabi-Yau Threefolds