add missing externs
expose own externs
fix format