Removed some redundancy and fixed a few string formatting issues.