Created 'codesetService' for client and refactored client code to utilize it.