Fix spaghetti code?

If SongSing's "fix" is on the server it doesn't seem to be working. The code was pretty ugly too.