Full code review

Same as above: use meaningful names, even if they are longer. Rewrite map/reduce/filter functions like I said above.