Seems like I just had to keep on restarting and rebooting Arduino for it to work, weird but it did the job! Thank you all.