Added some documentation, TODO-s and remooved some old useless commented code