Moved drupalgap_bootstrap() towards the top of the file.