Cater for more cases (var statements, requires)
Slightly more robust handling of require