Initial Commit. TODO:Use definitions instead of r/p.