extract code, text as list

only question, answer object need these methods.
this resolves #21 
Should `d` be defined in each test? I know that this increases the lines of code, but it also keeps each test independent of each other.