Moved var init to constructor, style fixes