Initial version of separate module for the qr function.