handle type and object ids, better comment handling (but not nested comments yet)