Better project structure

Also improved some testing