Simplified directive
Added some tests