Rebuild project structure
Added some tests