Added some option reading code