switch to jkroso/classes and use yields/merge

not really a very interesting PR sorry but I just wasn't happy using a OO api for something so simple.