add router class. es6 ftw.