Simplify, remove unused code