fixed minor issues, improved xAs* efficiency