Implemented service layer with unit tests