Added unit tests for the trakt client. Fixed code violations