Add more fixes/improvements. from rkowert.com