Lots namespace and include refactory

There were lots of problem about namespaces inside headers. I committed this inside this branch simply because I'm going to merge with the master branch very soon.