Added some documentation and small features.