Added helper function and modified application layout