Updated final app code