added doxygen comments and improved security of collections
improved code and added comments in server directory