Scope flux credentials by connection
Format code and optimize imports