Reccomended changes: moved directory method out and fixed formatting