updating error messages to be more informative/better formatted, some compiler-warning fixes