Separate problem from GUI, add constants