Added type class SafeEq
Modules reorganization