Added server responses and fixed a couple of bugs.