Cleaned up client code.