improve exception message
general cleanup
use name properly