Refactored repository to match my code format and imported code from private repo