revert debug code
refactoring
fix antialiasing, image scaling and arc