Used scripttest, cleaned up a little