Made changes to abstract away using OTP GenServer