Move options reading to separate module