Did more problems and made some lazy functions tail-recursive.