Made script a bit more readable