Working WRQ and RRQ with most bug fixes