Project structure refactoring and dependency management

Yes, I know, a lot of changes. But it looks better now.

Before:
![before](https://cloud.githubusercontent.com/assets/168414/3076570/eb992790-e3ea-11e3-878b-7bffe52349dc.png)
After:
![2014-05-25 15-12-24 windows 8 1](https://cloud.githubusercontent.com/assets/168414/3076592/ba17c4cc-e3ec-11e3-9d9f-dbcc4294287c.png)