Refactor, simplify, strip unused