Renamed script in view of it doing more stuff; from https://gist.github.com/anonymous/91548ecd79effc11ae7f