Use register properly in demo app