code clean up and made a start on api caching