Improve autoloading and namespace consistency

Change-Id: I910f73d1a25af3262b2f68b7b63deca0f8bba073