Initial major cleanup of the RAnal module