More helper function
Minor changes