removed unnecessary warning suppression.
added a couple of helper functions.
fixed a warning.