Improved filtering of unnessesary chars.