Cleanup and added textBox function