Changed Declaration to a tree

Added an instance for functor to a tree based Declaration data type.
![giphy](https://f.cloud.github.com/assets/136101/1022174/4142e37a-0d68-11e3-991a-11610a8e00a8.gif)