- clean up code - add nil checks instead of boolean - add script-message to allow print and add_to_queue functions to be called from outside