Closes #24 by adding tests and a couple of implementation for RNFSerializable protocol. Also refactored code a bit