Kdrefactor

ok, I've extracted some constants but put them inside function as I think they are no so important to be placed in config file.