Removed buggy block trimming code from main.sh