Format the code of the TextProcessor

Reorganized the order of the functionsy, created a single init method for the TextProcessor internal dependencies
More reformatting - refactoring

Remove deadcode, reorganize log on pn.js and tp.js
Increse the time out value of the autosave to 300
UNSTABLE: lot of refactoring, save commit
The basic loop work, need to rewrite the state machine and move to set interval from a much cleaner strategy