More Python 3.x fixes to core functions
Move some more documentation into sphinx from user guide