Industrial Cyber-Physical System applications, especially distributed ones are designed and implemented in many standard approaches, one of them being IEC 61499 distributed programming standard. This article presents a case study of applying couple of refactoring methods and techniques in order to improve readability, maintainability, reuse-ability and debugging friendliness of existing function block applications. The article presents some software metrics for pre and post refactoring function block applications for measuring the effectiveness of refactoring.