changed scriptfile into class to manage play/pause/stop/seek. Added playback in thread