removed last unnecessary function _gettype()

and replaced ident code parser with regex parser in listenOnce()