Code clean up and more additions for RDK support