Asset management, part 2

Implementing new asset management across the system. Also includes a series of small fixes and cleanups that have accumulated along the way.