Refactor and speed up

This PR refactors network class recognition so repeated parser class lookup is not necessary anymore.
It also adds some missing specs.

Please see individual commits for more details :)

Comments?