Update rc.lua

Cleaning up the code, adding comments, removing some stuff I no longer use.