Cleaned up old JS a little