Replaced `reload` with `imp.reload` for python 3 compatibility.