Formatted/commented code better.