Added salt initializations, fixed "not defined" error