Change function names in mainapp for clarification