Dialysis systems comprising actuators that cooperate to perform dialysis functions and sensors that cooperate to monitor dialysis functions are disclosed. According to one aspect, such a hemodialysis system comprises a user interface model layer, a therapy layer, below the user interface model layer, and a machine layer below the therapy layer. The user interface model layer is configured to manage the state of a graphical user interface and receive inputs from a graphical user interface. The therapy layer is configured to run state machines that generate therapy commands based at least in part on the inputs from the graphical user interface. The machine layer is configured to provide commands for the actuators based on the therapy commands.