All functions checked

All functions checked. Only comments left