Document rpg.cpp

Added much needed documentation.