DRY'd out code

- Removed repetitive code
- Removed some commented out and unnecessary code

I've clicked around and things seem to be fine.