Refactor of Application, implemented clustered and non clustered application code