Fixed unchecked return type warning.
Resolved compile errors, supressed varargs warning.