Final dump of dev changes, moved to new clean branch as most these changes are obsolete.