Refactoring JS.
Added post and archive modules.