change to pointer
fix some issues
Merge pull request #1 from lucasweiblen/refactoring

Refactoring