Refactoring - Better modularization of api and repos