Added the ri_cal library and implemented simple Preview and Validate commands.