Added director array, cleaned up code, changed function names