Adding documentation and fixing another tons of bugs