introduce $ Factory
oups, include good script in factory.jade
minor js fix
update layout