I refactored the application to be function-oriented.