refactoring.
useless lines removed
more refactoring