Code cleanup
App calls now pass a user-defined pointer to the App as first argument