Refactor JS out of view. Add paloma and gob