more perl interface improvements
tidy