Changed some locks to semaphores and added thread syncronization to spotify web api