Introduce RTL and add unit tests