Closes #32
Closes #33
Closes #34
Reduced repetition