Removed dead code
Some more code documentation