Revereted to last commit before merging version 11 & 12
Refactored a lot