Cleaned up formatting and used StringBuilder instead of string concat.