Changed the architecture to support client and server interactions
better