Fix AdX; adding basic unit testing