implemented and tested resource.registers property and fixed cs

Closes #127