Refactor files panel to use a centralized Codebot API

Trying to centralize everything in the “codebot namespace”. It will
save several parameters in init methods all over the place.