Add symfony commands and extract logic 

This is still work in progress, but I'm opening the PR early to gather more input.

I've started this to tackle only #9 at first. But I quickly saw this would not work except I also handle #10.

I think I've explained my changes well enough in the commits.