Merging in latest features/fixes from ongoing project.