delete unused vars
avoid NPE
use decimal literals