General cleanup

Merge changes from testing branch to master, this has been long overdue.