Refactored the RawRPG sample