Refactor directory structure

split main.js into controller, factories and directives as far as possible.
Merge pull request #3 from tobiasmuecksch/master

Refactor directory structure