Merged in amerish branch fixes.