Broken adding entity require in correct spots, wrapping sub apps and controllers in defines