Removed useless parameter to NetL
Used auto derivation of Functor and Foldable
Added check for cycle