Added stuff to get code from API