Added getClassName to find a class dynamically.
Added simple precondition functions.