Move option setting code into new functions
Write tests for client