Cleaned up createRequest
Cleaned up initDirectory