change RuntimeExceptions to NoClassDefFoundError
cleanup code