Breaking code for setting up options into a separate file
Added logging tool