added support for getinfo and corrected some errors