some refactoring, notes on processing.js trouble with chars