Cleaned up code, slightly.