Application: added custom_mainloop argument to constructor