Added tests. Moved executor to Utils.