Fixing Sys-Message function and removing empty vars