Add logic compiling and tests.