Improve Python 2.x/3.x compatibility (return lists explicitly)