Reg: Added fixtures for tests, migrated switch case ops to separate reg function etc