more refactoring

<3 json