Small refactors
Restructured project
Fixed memory leak