Updated the main app to use the monadic variant