Simplify register assets code