Added button press function and hopefully improved stack memory usage