Feature/6 calculate emissions

Closes #6 
Indent `when` as deep as `case`.