Bugs/json remote includes parsing errors

WIP, missing unit tests.