removed String.trim polyfill
cleaned up remaining type comparisons
reorganization / cleanup, trimmed down main.js