Code fixes and var name now protected