Applying changes from JASheppard