Added rest communication classes and some fixes