More corrections as skeldir doesnt work with copy()
Add console to permit standalone use