Working on removing script bugs