supports python3, moved util functions into __init__

Is this a breaking change for existing code that uses this?