Fixed namespace collision with self, needed var keyword in a couple places