Split commands into individual functions