Split script in 2 parts for readability / ease of use