adding a working state on index and new.jade
adapting new.jade because of error and reworking it
refactoring small pieces