Completed JSON parser that inserts course data into tables