updated code. still trying to get app registry working with tests...