Agreed, I found it a bit tricky without refactoring this quite a lot. Would appreciate a pair on it if you have an idea on how to do it.