code cleanup according to input from Silox
code cleanup according to input from Silox