Refactored new client code to mvc pattern.