Convert Application to WCF Library, Host/Client.

Some bugs are still present from the change over.