currently the whole script, will be breaking down into multiple scripts and classes soon