Improved the documentation and removed doxygen warnings.
Fixed compiler warnings on g++ 4.7 regarding signed v.s. unsigned integers.