removed dependency on keyword and fixed data directory detection and creation