Refactor + improve simplification
Add compile warnings
Bugfixes