Fixed tests, text buttons, cleaned visibility code.