Added new constructor and updated mode to rws.