Refactor and introduce interceptors