Small refactoring changes

Mainly code formating fixed.