Last commits before deep refactoring
Refactored code, lens generation and test pendig
Added build from raw tree
Most of the test done
Finished refactoring