updates scalaz and code tidy