Fix, refactoring
Solution for #2