Alpha channel for result, small chunks filtering, misc refactoring