Changed the two scripts a bit