Add Midje and refactor