seperated out JS functions; added check for empty repository when queueing all objects