refactored code and removed data output text areas