Improved some on restoring connections, and added an auto-reply for pms
Modified calculator gramamr to allow more flexibility with parenthesized expressions.