assets_encode improved

other small cleanups