small compilation fix
small unimportant changes
refactoring