All 3 functions are working properly now, and printouts work also