Modularizing the application for my example