Finished code to create court and link to facility