Add more tests around requierd options. Split out some helper functions into their own modules.